package com.hpe.wx.performance.mongo.statusrecord.dao;

import java.util.List;

import org.springframework.data.mongodb.repository.MongoRepository;
import org.springframework.stereotype.Repository;

import com.hpe.wx.performance.mongo.statusrecord.domain.StatusRecord;

@Repository
public interface StatusRecordDao extends 
	MongoRepository<StatusRecord, String>, 
	StatusRecordDaoEx { // 这个接口中可以写一些StudentDao不能满足要求的方法。我这里纯粹测试好玩
	public List<StatusRecord> findByJmxId(String url);
	
	
	public List<StatusRecord> findByGenerateTimestampBetween(Long dateStart, Long dateEnd);
	
	
	//@Query("select jo from JmxObj jo where jo.status=1")
	//public List<JmxObj> findAllByCustomQueryAndStream();
	
	//@Async
	//public StatusRecord findLastByOrderByGenerateTimestampAsc();
	
	public StatusRecord findFirstByOrderByGenerateTimestampDesc();
	
	public StatusRecord findLastByOrderByGenerateTimestampAsc();
	
	//public List<StatusRecord> findByJmxIdOrderByGenerateTimestampDesc(String jmxId);
	
	
	
//	@Query("select u from JmxObj u")
//	public List<JmxObj> findAllByCustomQueryAndStream();
//	
//	@Async
//	public JmxObj findLastByOrderByCreateTimeAsc();
	//public JmxObj findByCreateTimeGreaterThan (Long dateStart);
	
	
	//public JmxObj findByCreateTimeGreaterThan (Long dateStart);
	
//	public List<StatusRecord> findByName(String name);
//	
//	public List<StatusRecord> findByCreateTimeBetween(Long dateStart, Long dateEnd);
//	
//	public List<StatusRecord> findByStatus(Integer status);
	
	//public JmxObj findByCreateTimeGreaterThan (Long dateStart);
	
	
	
//	User findFirstByOrderByLastnameAsc();
//
//	User findTopByOrderByAgeDesc();
//
//	Page<User> queryFirst10ByLastname(String lastname, Pageable pageable);
//
//	Slice<User> findTop3ByLastname(String lastname, Pageable pageable);
//
//	List<User> findFirst10ByLastname(String lastname, Sort sort);
//
//	List<User> findTop10ByLastname(String lastname, Pageable pageable);
}
